﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/client/2007"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:FloorDesigner"
  xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows">

    <!-- Container control -->
    <Style TargetType="local:TableControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:TableControl">
                    <Grid Background="{TemplateBinding Background}" x:Name="LayoutRoot">
                        
                        <!-- State manager -->
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="NormalStates">
                                <vsm:VisualStateGroup.Transitions>
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="Normal">
                                    <Storyboard />
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="MouseOver">
                                    <Storyboard />
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard />
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="DraggingStates">
                                <vsm:VisualStateGroup.Transitions>
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="DragStarted">
                                    <Storyboard />
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Dropped">
                                    <Storyboard />
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="ContainerStates">
                                <vsm:VisualState x:Name="ContainerEnter">
                                    <Storyboard />
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="ContainerExit">
                                    <Storyboard />
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>
                        
                        <!-- Content -->
                        <Border BorderThickness="{TemplateBinding BorderThickness}" 
                                BorderBrush="{TemplateBinding BorderBrush}">
                            <ContentPresenter
                                x:Name="contentPresenter" 
                                Content="{TemplateBinding Content}" 
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                Margin="{TemplateBinding Padding}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
